package com.modai.springcloud.controller;

import com.modai.springcloud.entities.CommonResult;
import com.modai.springcloud.entities.Order;
import com.modai.springcloud.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ：modai
 * @date ：Created in 2020-12-21 11:28
 * @description：
 */
@RestController
public class OrderController {
    @Resource
    private OrderService orderService;

    @GetMapping("/create/order")
    public CommonResult create(Order order){
        orderService.create(order);
        return new CommonResult(200,"订单创建成功。");
    }

}
